package com.foreknow.oop9;

public class TestSingleton {
  public static void main(String[] args) {

    Singleton s = Singleton.getSingleton();
    s.setName("tom");
    System.out.println(s.getName());

    Singleton s1 = Singleton.getSingleton();//问题是s与s1是不是同一个对象？
    System.out.println(s1.getName());

  }
}
